package com.hnhegui.backend.order.api;

import com.hnhegui.backend.entity.Result;
import com.hnhegui.backend.order.dto.request.FulfillmentRequestDTO;
import com.hnhegui.backend.order.dto.response.FulfillmentResponseDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Validated
@FeignClient(value = "hnhegui-backend-order", path = "/api/fulfillments", contextId = "fulfillmentRestApi")
public interface FulfillmentRestApi {

    /**
     * 订单履约
     */
    @PostMapping("/process")
    Result<FulfillmentResponseDTO> processFulfillment(@Validated @RequestBody FulfillmentRequestDTO request);
}
